@extends('manage._layout')

@section('page-cssjs')
<style type="text/css">
    .table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
        padding: 8px;
        line-height: 1.42857143;
        vertical-align: middle;
        border-top: 1px solid #ddd;
        text-align: center;
    }

    td, th {
        padding: 0;
        text-align: center;
    }
</style>
@stop
@section('page-title')
    <h3>角色列表</h3>
@stop
@section('page-breadcrumbs')
    <li>
        <a href="{{route('role_list')}}" title="">
            角色管理
        </a>
    </li>
@stop
@section('page-buttons')
    <li>
        <a href="{{URL::route('role_add')}}" role="button"><i class="icon-plus-sign"></i>添加角色</a>
    </li>
    <li>
        <a href="{{URL::route('menu_list')}}" role="button"><i class="icon-list"></i>菜单管理</a>
    </li>
    <li>
        <a href="{{URL::route('user_list')}}" role="button"><i class="icon-list"></i>用户管理</a>
    </li>
    <li>
        <a href="{{URL::route('first_menu_list')}}" role="button"><i class="icon-list"></i>一级菜单管理</a>
    </li>
@stop
@section('page-content')

    <table class="table table-striped">
        <thead>
        <tr>
            <th>排序</th>
            <th>角色名称</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        @if (!empty($data))
            @foreach($data as $key=>$val)
                <tr>
                    <td>{{$val->sort}}</td>
                    <td>{{$val->name}}</td>
                    <td class="td-actions"><a href="{{URL::route('role_power_list',['id'=>$val->id])}}"
                                              class="btn btn-xs btn-primary"><span class="icon-zoom-in"
                                                                                   aria-hidden="true"></span>权限列表</a>
                        &nbsp;&nbsp;<a href="{{URL::route('role_edit',['id'=>$val->id])}}" class="btn btn-xs btn-info"
                                       role="button"><span class="icon-pencil" aria-hidden="true"></span>修改</a>
                    </td>
                </tr>
            @endforeach
        @else
            <tr>
                <td colspan="4">暂无数据</td>
            </tr>
        @endif
        </tbody>
    </table>

@stop